home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
cachemon.zip
/
MONITOR.A86
< prev
next >
Wrap
Text File
|
1990-03-11
|
2KB
|
72 lines
jmp init
; Now the BIOS spying routines
old_handler dw ?,?
signature db 'CACHEMON 1.0 disk access monitor'
read_count dw 0,0
read_sects dw 0,0
write_count dw 0,0
write_sects dw 0,0
my_id db 80h
more_sig dw 0,1234h ; will be 12345678h when running
my_name db 0,8 dup (' ')
main_entry: ; called by INT 13h
push ax
pushf
cs cmp dl,my_id
jne main_exit
cmp ah,02
je read02
cmp ah,03
je write03
main_exit:
popf
pop ax
cs jmp far d[old_handler]
read02:
cbw
cs add read_sects,ax
cs adc read_sects[2],0
cs inc read_count
cs adc read_count[2],0
jmp main_exit
write03:
cbw
cs add write_sects,ax
cs adc write_sects[2],0
cs inc write_count
cs adc write_count[2],0
jmp main_exit
setup_int13:
xor ax,ax
mov es,ax
es les bx,d[4*13h] ; get old int 13 address
mov old_handler,bx
mov old_handler[2],es
mov es,ax
mov bx,cs
cli
es mov w[4*13h], offset main_entry ; set us up as INT 13 ISR
es mov w[4*13h+2],bx
sti
mov more_sig,5678h
ret